package com.study.easyexcel.business.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.study.easyexcel.api.annotation.ConverterConfiguration;
import com.study.easyexcel.api.annotation.DropdownBox;
import com.study.easyexcel.api.annotation.HeadHyperlink;
import org.apache.poi.common.usermodel.HyperlinkType;

/**
 * @author yuhuan
 * @date 2023/10/26
 */
@HeadRowHeight(26)
public class Legion {

    @ExcelProperty(value = {"基础信息", "姓名"}, order = 0)
    @ColumnWidth(12)
    @ContentStyle(dataFormat = 49)
//    @ExcelExportIgnore
    private String name;

    /**
     * 类型可来源于数据库的字典配置
     */
    @ExcelProperty(value = {"基础信息", "阵营"}, order = 1)
    @ColumnWidth(13)
    @DropdownBox(firstRow = 2, firstCol = 1, lastCol = 1, dynamicList = true)
    @ConverterConfiguration("camp")
    private String campCode;

    @ExcelProperty(value = "文档链接", order = 2)
    @ColumnWidth(12)
    @HeadHyperlink(index = 2, value = "说明!A1", type = HyperlinkType.DOCUMENT)
    private String hyperlink;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCampCode() {
        return campCode;
    }

    public void setCampCode(String campCode) {
        this.campCode = campCode;
    }

    @Override
    public String toString() {
        return "Legion{" +
                "name='" + name + '\'' +
                ", camp='" + campCode + '\'' +
                '}';
    }
}
